package com.dsj.gxrd.modules.book.domain.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.dsj.gxrd.modules.book.domain.dto.RdFileDto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * @author songpin566
 * @date 2023/09/14
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "交流分享VO")
public class RdCommShareVo {

    @ApiModelProperty("id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long rdCommShareId;

    @ApiModelProperty("标题")
    @Min(1)
    @Max(100)
    private String title;

    @ApiModelProperty("内容")
    @NotBlank
    private String content;

    @ApiModelProperty("分享人")
    @NotBlank
    private String sharePerson;

    @ApiModelProperty("审批状态")
    private Integer approvalStatus;

    @ApiModelProperty("创建者")
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    private RdFileDto file;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime approvalTime;

    @ApiModelProperty("审核人姓名")
    private String approvalPersonName;


}
